from twisted.conch.telnet import NULL

def abstract():
    raise NotImplementedError("abstractor")

class Effect(object):
    def __init__(self):
        pass

class EventEffect(Effect):
    def __init__(self):
        self.kind = 'KeyEffect'
        if self.__class__ is EventEffect:
            abstract()
        #print "EventEffect_init"
          
    def broadCast(self,usrlst):
        self.description()
        print "broadCast_base"
        
    def description(self,usrlst):
        pass
    
    def MakeEffect(self,usrlst):
        pass

class KeyEffect(Effect):
    def __init__(self):
        pass
    def work(self):
        print "KeyEffect"
        pass
    

class ItemEffect(Effect):
    def __init__(self):
        pass
###########################################################################

#ITEM
ITEM_SWORD = 0

#KEY
KEY_BOOK = 0

#EVENT
EVENT_EARTHQUAKE = 0
class Event_EARTHQUAKE_Effect(EventEffect):
    def __init__(self):
        EventEffect.__init__(self)
        self.descrip = "An earthquake occur..."
        pass
    def work(self,GameEnv):
        print "Event_EARTHQUAKE_Effect" + self.kind
        self.broadCast(self.room)
        pass
    def description(self):
        print self.descrip
    
    def MakeEffect(self, GameEnv):
        EventEffect.MakeEffect(self, GameEnv)
        
EventEffectSet = {}
EventEffectSet[EVENT_EARTHQUAKE] = Event_EARTHQUAKE_Effect()
